<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Latina CRM</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <link rel="stylesheet" type="text/css" href="css/principal_mobile.css"/>
            <link href="css/smoothness/jquery-ui-1.8.23.custom.css" rel="stylesheet" type="text/css" />
            <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon"/>
            <link rel="apple-touch-icon" href="img/icon.png" />

            <script src="js/jquery.js" type="text/javascript"></script>
            <!--<script src="js/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>-->

            <script type="text/javascript" src="js/mask.js"></script>
            <script type="text/javascript" src="js/jquery.mask.min.js"></script>

            <script src="js/padrao.js" type="text/javascript"></script>

    </head>
    <body>
        <div id="DivPesquisaCliente"></div>
        <div id='root'>
            <div class='box' id='box1'>
                <?php
                require_once("autoload.php");

                $sessao = new Sessao();
                $sessao->setSessionName("projeto");
                $sessao->iniciaSessao();

                if (isset($_SESSION['codigo_logado'])) {
                    $logado = $_SESSION['codigo_logado'];
                } else {
                    $logado = "";
                }

                if (!$logado) {
                    include("admin/form_login_mobile.php");
                } else {
                    $nivel = Util::retornaNivel($sessao->getVarSessao('codtipo'));
                    if (isset($_POST['pagina'])) {
                        $pagina = $_POST['pagina'];
                        ?>
                        <div id="item" >Registro de <?php echo ucfirst($pagina); ?></div>
                        <?php
                        switch ($pagina) {
                            case 'cliente': include('admin/form_cliente_mobile.php');
                                break;
                            case 'visita': include('admin/form_visita_mobile.php');
                                break;
                            case 'sair': include('logout.php');
                                break;
                        }
                    } else {
                        ?>
                        <form id="form_menu" action="principal_mobile.php" method="post" >
                            <input class="botao" style="font-size:36px;" type="submit" name="pagina" value="cliente"/> 
                            <input class="botao" style="font-size:36px" type="submit" name="pagina" value="visita"/> 
                            <input class="botao" style="font-size:36px" type="submit" name="pagina" value="sair"/> 
                        </form>
                    <?php } ?>
                </div>
            </div>     
            <?php
        }
        ?>
    </body>
</html>